<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
<div style="width: 100%;height: 100%;background-color: #fb4206;text-align: center;padding: 15px;">
    <p><span>设置爬虫</span></p>
   <p> <span>淘宝账号<input type="text" name="username" id="username" value=""/></span></p>
   <p> <span>淘宝密码<input type="password" name="userpwd" id="userpwd" value=""/></span></p>
   <p> <span>分类<input type="text" name="category" id="category" value="男装"/></span></p>
   <p> <span>地址<input type="text" name="searchurl" id="searchurl" value="https://s.taobao.com/list?q=T%E6%81%A4&cat=50344007&style=grid&seller_type=taobao&spm=a219r.lm895.1000187.1"/></span></p>
      <p><button onclick="buildOnClick()">开始爬取数据</button></p>
</div>
<script>
    function buildOnClick() {
        var username=document.getElementById("username");
        var userpwd=document.getElementById("userpwd");
        var category=document.getElementById("category");
        var searchurl=document.getElementById("searchurl");
          $.ajax({
                type:'get',
                async:false,
                url:'/h_setting?username='+ username.value+"&userpwd="+userpwd.value+"&category="+category.value+"&searchurl="+searchurl.value,
                dataType:'text',
              success:function (data) {
                    alert(data);
              }});
    }
</script>
</body>
</html>